package yb.ecp.fast.user.infra;

/**
 * Created by LiChangjiang on 2018/1/18 0018.
 */
public abstract class AuthCode
{
    private static final long ACCOUNT = 1000;// 账号
    private static final long DEPT = 1100;// 组织机构
    private static final long USER = 1300;// 人员信息
    private static final long ROLE = 1400;// 角色
    private static final long TEMPLATE = 1500;// 权限模板
    private static final long WORKSPACE = 1600;// 工作空间


    /**
     * 账号
     */
    public static class Account
    {
        public static final long INSERT = ACCOUNT + 1;

        public static final long QUERY = ACCOUNT + 2;

        public static final long REMOVE_BY_LOGINNAME = ACCOUNT + 3;
        public static final long REMOVE_BY_USERID = ACCOUNT + 4;
        public static final long ADD_WITH_PWD = ACCOUNT + 5;
        public static final long REMOVE_ALL_PASSWORD = ACCOUNT + 6;
        public static final long INSERT_PASSWORD = ACCOUNT + 7;
        /**
         * 设置用户新密码
         */
        public static final long SET_NEW_PASSWORD = ACCOUNT + 8;
        /**
         * 修改密码
         */
        public static final long UPDATE_PASSWORD = ACCOUNT + 9;
        public static final long RESET_PASSWORD = ACCOUNT + 10;
        public static final long UPDATE_LOGIN_NAME = ACCOUNT + 11;

        public static final long RESET_PASSWORD_BY_ORG = 80919004L;// 密码重置
    }

    /**
     * 组织机构
     */
    public static class Department
    {
        public static final long LIST = DEPT + 1;
        public static final long ITEM = DEPT + 2;
        public static final long INSERT = DEPT + 3;
        public static final long UPDATE = DEPT + 4;
        public static final long REMOVE = DEPT + 5;
    }

    /**
     * 用户
     */
    public static class User
    {
        public static final long ADD = USER + 1;

        /**
         * 查询用户信息
         */
        public static final long DETAIL = 0;

        /**
         * 获取登录用户信息
         */
        public static final long LOGIN_USER_INFO = USER + 3;

        /**
         * 查询用户信息（个人中心）
         */
        public static final long QUERY_USER_INFO = USER + 4;
        public static final long LIST = USER + 5;
        /**
         * 批量删除
         */
        public static final long REMOVES = USER + 6;

        /**
         * 修改个人信息（个人中心）
         */
        public static final long UPDATE_SELF = USER + 7;
        /**
         * 修改用户信息（用户列表）
         */
        public static final long UPDATE_USER = USER + 8;

        /**
         * 根据账号修改用户信息
         */
        public static final long UPDATE_BY_ACCOUNT = USER + 9;

        /**
         * 用户禁用与启用
         */
        public static final long LOCKED = USER + 10;
        /**
         * 查询Oauth2个人信息
         */
        public static final long USER_INFO_BY_OAUTH2 = USER + 11;

        /**
         * 查询平台所有用户（机场签单）
         */
        public static final long ALL_USER = USER + 12;
    }


    /**
     * 角色
     */
    public static class Role
    {
        public static final long ADD = ROLE + 1;
        public static final long DELETE = ROLE + 2;
        /**
         * 批量删除
         */
        public static final long BATCH_DELETE = ROLE + 3;
        public static final long UPDATE = ROLE + 4;
        public static final long ITEM = ROLE + 5;
        public static final long LIST_BY_WORKSPACE = ROLE + 6;
        /**
         * 获取所有角色（机场签单）
         */
        public static final long ALL_ROLES = ROLE + 7;

        /**
         * 单个角色设置批量用户
         */
        public static final long ROLE_USERS = ROLE + 8;
        /**
         * 单个角色设置单个用户
         */
        public static final long ROLE_USER = ROLE + 9;
        /**
         * 删除用户的一个角色
         */
        public static final long DELETE_USER_ROLE = ROLE + 10;
        /**
         * 查询拥有该角色的所有用户ID
         */
        public static final long USER_IDS_BY_ROLE = ROLE + 11;

        /**
         * 查询用户拥有的所有角色ID集合
         */
        public static final long ROLE_IDS_BY_USER = ROLE + 12;

        /**
         * 查询用户拥有的所有角色集合
         */
        public static final long ROLE_LIST_BY_USER = ROLE + 13;

        /**
         * 给角色设置菜单
         */
        public static final long ADD_MENUS_BY_ROLE = ROLE + 14;

        /**
         * 给角色设置菜单与权限
         */
        public static final long ADD_MENUS_AUTHS_BY_ROLE = ROLE + 15;
        /**
         * 获取角色拥有的菜单ID集合
         */
        public static final long MENUS_ID_BY_ROLE = ROLE + 16;

        /**
         * 根据角色ID获取菜单和权限ID集合
         */
        public static final long MENUS_AUTHS_ID_BY_ROLE = 0;
        /**
         * 获取用户拥有的权限code
         */
        public static final long AUTH_CODES_BY_USER = 0;
        /**
         * 查询部门下的角色集合
         */
        public static final long ROLES_BY_DEPT = ROLE + 19;
    }

    /**
     * 权限模板
     */
    public static class Template
    {
        public static final long LIST = TEMPLATE + 1;
        public static final long INSERT = TEMPLATE + 2;

        /**
         * 批量删除权限模板
         */
        public static final long BATCH_REMOVE = TEMPLATE + 3;
        public static final long UPDATE = TEMPLATE + 4;
        public static final long ITEM = TEMPLATE + 5;

        /**
         * 配置权限模板的权限
         */
        public static final long CONFIG_TMP_AUTH = TEMPLATE + 6;

        /**
         * 配置权限模板的菜单
         */
        public static final long CONFIG_TMP_MENU = TEMPLATE + 7;
        /**
         * 配置权限模板的权限与菜单
         */
        public static final long CONFIG_TEMPLATE = TEMPLATE + 8;

        /**
         * 查询模板的权限与MENU信息
         */
        public static final long QUERY_TEMPLATE_CONFIG = 0;

        /**
         * 查询模板下的MENU集合
         */
        public static final long QUERY_TEMPLATE_MENUS = 0;
        /**
         * 查询模板下的权限CODE集合
         */
        public static final long QUERY_TEMPLATE_AUTH_CODES = 0;

        /**
         * 删除模板下的所有权限
         */
        public static final long REMOVE_TEMPLATE_AUTHS = TEMPLATE + 12;
        /**
         * 删除模板下的所有MENU
         */
        public static final long REMOVE_TEMPLATE_MENUS = TEMPLATE + 13;
        /**
         * 批量删除模板下的MENU
         */
        public static final long BATCH_REMOVE_MENUS = TEMPLATE + 14;
        /**
         * 批量删除模板下的权限
         */
        public static final long BATCH_REMOVE_AUTHS = TEMPLATE + 15;
    }

    public static class Workspace
    {
        public static final long LIST = WORKSPACE + 1;
        public static final long ADD = WORKSPACE + 2;
        public static final long BATCH_REMOVE = WORKSPACE + 3;
        public static final long UPDATE = WORKSPACE + 4;
        public static final long ITEM = WORKSPACE + 5;
        public static final long UPDATE_TEMPLATE = WORKSPACE + 6;
        public static final long REMOVE = WORKSPACE + 7;
    }

}
